home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 140
/
(Vol 140) Sep 19 2011.iso
/
Games
/
mardek_rpg.swf
/
scripts
/
DefineSprite_5747_dialogue_box
/
frame_1
/
DoAction.as
< prev
Wrap
Text File
|
2011-09-19
|
24KB
|
534 lines
function §\x01\x02§()
{
return 323 % 511 * 5;
}
var §\x01§ = -1167 + "\x01\x02"();
while(true)
{
if(eval("\x01") != 448)
{
if(eval("\x01") != 39)
{
if(eval("\x01") != 938)
{
if(eval("\x01") == 52)
{
set("\x01",eval("\x01") + 423);
}
else
{
if(eval("\x01") == 475)
{
set("\x01",eval("\x01") - 265);
continue;
}
if(eval("\x01") == 79)
{
set("\x01",eval("\x01") + 131);
continue;
}
if(eval("\x01") == 210)
{
set("\x01",eval("\x01") - 135);
§§push("\x0f");
§§push(1);
continue;
}
if(eval("\x01") == 311)
{
set("\x01",eval("\x01") + 210);
continue;
}
if(eval("\x01") == 75)
{
set("\x01",eval("\x01") + 863);
var §§pop() = function §\x01\x02§()
{
return 323 % 511 * 5;
};
continue;
}
if(eval("\x01") == 534)
{
set("\x01",eval("\x01") - 248);
§§push(eval(function §\x01\x02§()
{
return 323 % 511 * 5;
}));
continue;
}
if(eval("\x01") == 286)
{
set("\x01",eval("\x01") + 604);
§§push(!function §\x01\x02§()
{
return 323 % 511 * 5;
});
continue;
}
if(eval("\x01") == 890)
{
set("\x01",eval("\x01") - 579);
if(function §\x01\x02§()
{
return 323 % 511 * 5;
})
{
set("\x01",eval("\x01") + 210);
}
continue;
}
if(eval("\x01") != 521)
{
if(eval("\x01") == 925)
{
set("\x01",eval("\x01") - 925);
break;
}
break;
}
set("\x01",eval("\x01") + 404);
_global.Console = function(msg, colour)
{
_root.conv.as.SetMessage(msg,colour);
};
_global.GIVEQUEST = function(QuestID)
{
var _loc3_ = true;
var _loc2_ = 0;
while(_loc2_ < _root.quests.length)
{
if(_root.quests[_loc2_].ID == QuestID)
{
_loc3_ = false;
break;
}
_loc2_ = _loc2_ + 1;
}
if(_loc3_)
{
_root.quests.push({ID:QuestID,done:false});
Console("Got the Quest \'<b>" + _root.GetQuest(QuestID).title + "\'</b>.","E4C377");
}
};
_global.DONEQUEST = function(QuestID)
{
var _loc2_ = 0;
while(_loc2_ < _root.quests.length)
{
if(_root.quests[_loc2_].ID == QuestID)
{
_root.quests[_loc2_].done = true;
break;
}
_loc2_ = _loc2_ + 1;
}
};
_global.GIVEITEM = function(itemname, amount)
{
_root.pickupItem(itemname,amount == undefined ? 1 : int(amount),!itemname.name ? _root.GetItemByName(itemname).type : "wepn");
Console("Got <b>" + (!itemname.name ? (!itemname.title ? itemname : itemname.title) : itemname.name) + "</b> x" + (amount == undefined ? 1 : int(amount)),"00cc66");
};
_global.GIVEPLOTITEM = function(itemname)
{
if(_root.plotVars.ITEMS.concat == undefined)
{
_root.plotVars.ITEMS = [];
}
_root.plotVars.ITEMS.push(itemname);
Console("Got the Key Item \'<b>" + itemname + "\'</b>.","00cc66");
};
_global.TAKEITEM = function(itemname, num)
{
_root.dropItem(itemname,null,null,num);
Console("Lost the item \'<b>" + _parent.speech[1] + "\'</b>.","00cc66");
};
_global.TAKEPLOTITEM = function(itemname)
{
var _loc2_ = 0;
while(_loc2_ < _root.plotVars.ITEMS.length)
{
if(_root.plotVars.ITEMS[_loc2_] = itemname)
{
_root.plotVars.ITEMS[_loc2_] = null;
}
_loc2_ = _loc2_ + 1;
}
Console("Lost the key item \'<b>" + itemname + "\'</b>.","00cc66");
};
_global.GIVEGOLD = function(amount)
{
_root.money += amount;
Console("Got <b>" + amount + "</b> gold.","ffff00");
};
_global.TAKEGOLD = function(amount)
{
_root.money -= amount;
Console("Lost <b>" + amount + "</b> gold...","ffff00");
};
_global.OPENSHOP = function(shopname, itemlist)
{
_root.selInv = 1;
_root.inventory = _root.PCstats_1.inventory;
_root.shop = shopname;
_root.warez = new Array(24);
var _loc2_ = 0;
while(_loc2_ < itemlist.length)
{
_root.warez[_loc2_] = {item:itemlist[_loc2_],amount:1};
_loc2_ = _loc2_ + 1;
}
_root.cont.PC.brain.StoreLocation();
_root.cont._visible = false;
_root.gotoAndStop("_SHOP_");
};
_global.OPENFORGE = function(forgename)
{
_root.forgingNow = true;
OPENSHOP(forgename,[]);
};
_global.OPENMFORGE = function(forgename)
{
_root.forgingNow = "spell";
OPENSHOP(forgename,[]);
};
_global.JOINPARTY = function(altSpeaker, dont_redraw)
{
if(altSpeaker != undefined)
{
_root.conv.SPEAKING = altSpeaker;
}
var _loc5_ = _root.conv.SPEAKING.props;
var _loc3_ = _loc5_.PC_STATS;
_root.calculateStats(_loc3_);
var _loc4_ = _loc5_.level;
if(_loc4_ != undefined)
{
var _loc2_ = 1;
while(_loc2_ < _loc4_)
{
_root.LevelUp(_loc3_);
_loc2_ = _loc2_ + 1;
}
}
_root.calculateStats(_loc3_);
_root.RestoreHPMP(_loc3_);
_loc3_.ON_PARTY = true;
_root.plotVars.Allies[_loc3_.name] = _loc3_;
if(!dont_redraw)
{
_root.conv.SPEAKING.removeMovieClip();
}
if(_root.PCstats_4.model == null || _root.PCstats_3.model == null || _root.PCstats_2.model == null)
{
_root["PCstats_" + (_root.PCstats_2.model != null ? (_root.PCstats_3.model != null ? 4 : 3) : 2)] = _loc3_;
_root.cont.PC.brain.lastMoves = [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]];
if(!dont_redraw)
{
_root.DrawParty(2,_root.cont.PC._x,_root.cont.PC._y);
}
}
};
_global.LEAVEPARTY = function(nom, x, y, dir, conv)
{
if(_root.PCstats_2.name != nom && _root.PCstats_3.name != nom)
{
return undefined;
}
var _loc3_ = _root.PCstats_3.name != nom ? 2 : 3;
var _loc2_ = _root.Clone(_root["PCstats_" + _loc3_]);
_loc2_.BONUS = {STR:0,VIT:0,SPR:0,AGL:0};
_loc2_.ON_PARTY = false;
_root.plotVars.Allies[_loc2_.name] = _loc2_;
_loc2_ = null;
_loc2_ = _root.Clone(_root["PCstats_" + _loc3_]);
if(x != null)
{
_root.addSprite({name:nom,model:"s_" + _loc2_.model,stats:_loc2_,x:x,walkspeed:-1,y:y,counter:"NULL",dir:dir,conv:conv});
}
if(_loc3_ == 2 && _root.PCstats_3.model != null)
{
_root.PCstats_2 = _root.PCstats_3;
var _loc5_ = _root.PCstats_3.model;
_root.PCstats_3 = null;
_root.PCstats_2.model = _loc5_;
}
else if(_loc3_ == 2)
{
_root.PCstats_2 = null;
}
else if(_loc3_ == 3)
{
_root.PCstats_3 = null;
}
_root.cont.PC.brain.lastMoves = [[0,0],[0,0],[0,0],[0,0]];
_root.DrawParty(2,_root.cont.PC._x,_root.cont.PC._y);
};
_global.BATTLE = function(boss, altMusic, recurring, afteraction)
{
if(_root.conv.SPEAKING.props.items != undefined)
{
_root.monLoot = _root.conv.SPEAKING.props.items;
}
_root.cont.PC.brain.StoreLocation();
if(boss != undefined)
{
_root.boss = boss;
}
_root.playMusic(altMusic != undefined ? (altMusic !== 1 ? altMusic : "boss") : "battle");
if(!loadedFlasher)
{
_root.attachMovie("battle_trans","battle_trans",9999999);
loadedFlasher = true;
}
else
{
_root.battle_trans._visible = true;
_root.battle_trans.ctrl.count = 0;
}
if(recurring !== null)
{
if(recurring)
{
_root.defeatedBosses.push(boss[4]);
}
_root.spriteToKill = _root.conv.SPEAKING.brain;
}
if(afteraction == "TALK")
{
_root.spriteAction = "TALK";
}
};
§§push(_global);
§§push("SETVAR");
}
§§pop()[§§pop()] = function §\x01\x02§()
{
return 323 % 511 * 5;
};
eval(§§constant(0))[§§constant(116)] = function(varpath, value)
{
set(varpath,value);
};
eval(§§constant(0))[§§constant(117)] = function(frame)
{
_root[§§constant(53)][§§constant(54)][§§constant(55)][§§constant(56)]();
_root[§§constant(118)][§§constant(119)](frame,1);
};
eval(§§constant(0))[§§constant(120)] = function(goneforever)
{
_root[§§constant(121)] = true;
_root[§§constant(122)][§§constant(109)][§§constant(123)] = true;
if(goneforever)
{
_root[§§constant(111)][§§constant(10)](_parent[§§constant(65)][§§constant(66)][§§constant(18)]);
}
};
eval(§§constant(0))[§§constant(124)] = function()
{
_root[§§constant(2)][§§constant(65)][§§constant(74)]();
};
eval(§§constant(0))[§§constant(125)] = function(nom)
{
§§constant(84)(nom);
§§constant(120)();
};
eval(§§constant(0))[§§constant(126)] = function(lang)
{
set(§§constant(127),§§constant(128));
this[§§constant(59)](lang);
};
eval(§§constant(0))[§§constant(129)] = function(effectname, target)
{
target[§§constant(108)](§§constant(131),§§constant(130),82000);
target[§§constant(130)][§§constant(59)](effectname);
target[§§constant(130)][§§constant(82)] = target[§§constant(130)][§§constant(132)] / 2;
target[§§constant(130)][§§constant(81)] = target[§§constant(130)][§§constant(133)] / 2;
};
eval(§§constant(0))[§§constant(134)] = function(track)
{
_root[§§constant(105)](track);
};
eval(§§constant(0))[§§constant(135)] = function(speakername)
{
if(speakername == §§constant(136))
{
_root[§§constant(2)][§§constant(3)][§§constant(137)] = §§constant(138);
_root[§§constant(2)][§§constant(139)] = _root[§§constant(2)][§§constant(65)][§§constant(66)][§§constant(18)];
}
else
{
var _loc5_ = undefined;
var _loc4_ = undefined;
var _loc7_ = undefined;
var _loc6_ = undefined;
if(_root[§§constant(53)][speakername])
{
_loc5_ = _root[§§constant(53)][speakername][§§constant(66)][§§constant(76)];
_loc4_ = _root[§§constant(53)][speakername][§§constant(66)][§§constant(92)][§§constant(140)];
_loc7_ = _root[§§constant(53)][speakername][§§constant(66)][§§constant(92)][§§constant(141)];
_loc6_ = _root[§§constant(53)][speakername][§§constant(66)][§§constant(142)];
}
else if(_root[§§constant(78)][§§constant(18)] == speakername || _root[§§constant(77)][§§constant(18)] == speakername || _root[§§constant(75)][§§constant(18)] == speakername)
{
var _loc3_ = _root[§§constant(75)][§§constant(18)] != speakername ? (_root[§§constant(77)][§§constant(18)] != speakername ? 2 : 3) : 4;
_loc5_ = _root[§§constant(79) + _loc3_][§§constant(76)];
_loc4_ = _root[§§constant(79) + _loc3_][§§constant(140)];
_loc7_ = _root[§§constant(79) + _loc3_][§§constant(141)];
_loc6_ = _root[§§constant(79) + _loc3_][§§constant(142)];
}
_root[§§constant(2)][§§constant(3)][§§constant(137)] = [speakername,_loc5_,_loc4_,_loc7_,_loc6_];
_root[§§constant(2)][§§constant(139)] = speakername;
}
};
eval(§§constant(0))[§§constant(143)] = function(speaker_)
{
_parent[§§constant(144)][§§constant(145)][§§constant(146)][§§constant(59)](1);
if(speaker_ == §§constant(54))
{
_root[§§constant(2)][§§constant(65)] = {§\§\§constant(66)§:{§\§\§constant(76)§:§§constant(91) + _root[§§constant(47)][§§constant(76)],§\§\§constant(142)§:_root[§§constant(47)][§§constant(142)],§\§\§constant(92)§:_root[§§constant(47)]}};
}
else if(speaker_ == §§constant(147))
{
_root[§§constant(2)][§§constant(65)] = {§\§\§constant(66)§:{§\§\§constant(76)§:§§constant(148),§\§\§constant(149)§:§§constant(150),§\§\§constant(92)§:{§\§\§constant(76)§:§§constant(151),§\§\§constant(18)§:(!_root[§§constant(152)] ? §§constant(153) : §§constant(154))}}};
_parent[§§constant(144)][§§constant(145)][§§constant(146)][§§constant(59)](§§constant(150));
}
else if(speaker_ == _root[§§constant(78)][§§constant(18)])
{
_root[§§constant(2)][§§constant(65)] = {§\§\§constant(66)§:{§\§\§constant(76)§:§§constant(91) + _root[§§constant(78)][§§constant(76)],§\§\§constant(149)§:_root[§§constant(78)][§§constant(142)],§\§\§constant(92)§:_root[§§constant(78)]}};
}
else if(speaker_ == _root[§§constant(77)][§§constant(18)])
{
_root[§§constant(2)][§§constant(65)] = {§\§\§constant(66)§:{§\§\§constant(76)§:§§constant(91) + _root[§§constant(77)][§§constant(76)],§\§\§constant(149)§:_root[§§constant(77)][§§constant(142)],§\§\§constant(92)§:_root[§§constant(77)]}};
}
else if(speaker_ == _root[§§constant(75)][§§constant(18)])
{
_root[§§constant(2)][§§constant(65)] = {§\§\§constant(66)§:{§\§\§constant(76)§:§§constant(91) + _root[§§constant(75)][§§constant(76)],§\§\§constant(149)§:_root[§§constant(75)][§§constant(142)],§\§\§constant(92)§:_root[§§constant(75)]}};
}
else
{
_root[§§constant(2)][§§constant(65)] = _root[§§constant(53)][speaker_];
}
};
}
set("\x01",eval("\x01") - 404);
§§push("\x0f");
continue;
eval(§§constant(0))[§§constant(155)] = function(face_dir)
{
var _loc2_ = §§constant(156);
if(face_dir == §§constant(54))
{
if(_root[§§constant(2)][§§constant(65)][§§constant(82)] < _root[§§constant(53)][§§constant(54)][§§constant(82)])
{
_loc2_ = §§constant(157);
}
else if(_root[§§constant(2)][§§constant(65)][§§constant(82)] > _root[§§constant(53)][§§constant(54)][§§constant(82)])
{
_loc2_ = §§constant(158);
}
else if(_root[§§constant(2)][§§constant(65)][§§constant(81)] > _root[§§constant(53)][§§constant(54)][§§constant(81)])
{
_loc2_ = §§constant(159);
}
}
else
{
_loc2_ = face_dir;
}
_root[§§constant(2)][§§constant(65)][§§constant(76)][§§constant(59)](_loc2_ + §§constant(160));
};
eval(§§constant(0))[§§constant(161)] = function(map)
{
if(!_root[§§constant(162)]())
{
_root[§§constant(27)][§§constant(163)][§§constant(10)](map);
}
};
eval(§§constant(0))[§§constant(164)] = function()
{
var _loc2_ = 1;
while(_loc2_ <= 4)
{
_root[§§constant(79) + _loc2_][§§constant(165)][1] = _root[§§constant(79) + _loc2_][§§constant(165)][0];
_root[§§constant(79) + _loc2_][§§constant(166)][1] = _root[§§constant(79) + _loc2_][§§constant(166)][0];
_root[§§constant(168)](_root[§§constant(79) + _loc2_],§§constant(167));
_loc2_ = _loc2_ + 1;
}
for(var _loc3_ in _root[§§constant(27)][§§constant(73)])
{
_root[§§constant(27)][§§constant(73)][_loc3_][§§constant(165)][1] = _root[§§constant(27)][§§constant(73)][_loc3_][§§constant(165)][0];
_root[§§constant(168)](_root[§§constant(27)][§§constant(73)][_loc3_],§§constant(167));
}
_root[§§constant(169)](_root,[150,255,255]);
_root[§§constant(171)](§§constant(170));
§§constant(1)(§§constant(173),§§constant(172));
};
eval(§§constant(0))[§§constant(174)] = function()
{
_root[§§constant(27)][§§constant(176)][§§constant(10)]([_root[§§constant(2)][§§constant(65)][§§constant(66)][§§constant(8)],_root[§§constant(175)]]);
_root[§§constant(2)][§§constant(65)][§§constant(55)][§§constant(177)] = true;
_root[§§constant(169)](_root[§§constant(2)][§§constant(65)][§§constant(76)],[255,0,0]);
};
}
set("\x01",eval("\x01") + 13);
if(function §\x01\x02§()
{
return 323 % 511 * 5;
})
{
set("\x01",eval("\x01") + 423);
}
continue;
eval(§§constant(0))[§§constant(178)] = function()
{
_root[§§constant(2)][§§constant(3)][§§constant(179)]();
};
eval(§§constant(0))[§§constant(180)] = function(actions, target, freeze)
{
var _loc4_ = target == undefined ? _root[§§constant(2)][§§constant(65)] : _root[§§constant(53)][target];
if(freeze)
{
_root[§§constant(181)] = true;
actions[§§constant(10)]([§§constant(182)]);
}
var _loc2_ = 0;
while(_loc2_ < actions[§§constant(7)])
{
_loc4_[§§constant(55)][§§constant(183)][§§constant(10)](actions[_loc2_]);
_loc2_ = _loc2_ + 1;
}
};
}
set("\x01",eval("\x01") - 409);
§§push(true);
continue;
eval(§§constant(0))[§§constant(184)] = function(area, x, y, warp)
{
_root[§§constant(185)] = false;
_root[§§constant(186)] = [x,y];
_root[§§constant(187)] = area;
if(warp)
{
_root[§§constant(188)]();
_root[§§constant(189)] = true;
}
else
{
_root[§§constant(122)][§§constant(109)][§§constant(123)] = true;
}
};
eval(§§constant(0))[§§constant(190)] = function(cutscene)
{
_root[§§constant(185)] = false;
_root[§§constant(187)] = cutscene;
_root[§§constant(122)][§§constant(109)][§§constant(123)] = true;
_root[§§constant(122)][§§constant(109)][§§constant(191)] = true;
};
eval(§§constant(0))[§§constant(192)] = function()
{
return _root[§§constant(47)][§§constant(76)].substr(7,1);
};
break;
}